package com.dragon.upms.biz.config;

//import com.dragon.auth.support.core.DragonDaoAuthenticationProvider;
//import com.dragon.auth.support.core.FormIdentityLoginConfigurer;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.Order;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer;
import org.springframework.security.config.annotation.web.configurers.RequestCacheConfigurer;
import org.springframework.security.web.SecurityFilterChain;

/**
 * @date: 2024/8/6 12:18
 * @author: ybl
 */
@Configuration
@EnableWebSecurity
//@EnableWebSecurity
public class WebSecurityConfiguration {
    @Bean
    public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
        http
                .authorizeRequests()
                .anyRequest().permitAll()  // 允许所有请求
                .and()
                .csrf().disable();  // 禁用 CSRF 防护

        return http.build();
    }
}
